using System.Collections.Generic;
using System.Linq;
using DreamDriven.TestFramework;
using NUnit.Framework;
using ObjectModelTests.Stubs;

namespace ObjectModelTests
{
    [TestFixture]
    public class DomainRepositoryTests : BaseDomainRepositoryTest<DataObject, int>
    {
        [Test]
        public void GetAllTest()
        {
            MockRepository.ReplayAll();
            Assert.AreEqual(Collection.Count(), DomainRepository.GetAll().Count);
        }

        protected override IEnumerable<DataObject> Collection
        {
            get
            {
                yield return new DataObject { Id = 1, Name = "1" };
                yield return new DataObject { Id = 2, Name = "2" };
            }
        }
    }
}